var mongoose = require('mongoose');
var materializeP = require('mongoose-materialized');
var Schema = mongoose.Schema;

// 定义一个普通的数据模型
var CateSchema = new Schema({
    text:{type:String },
    parentId:String,
    date:{type:Date,default: Date.now }

});
// 将数据模型应用分页插件
CateSchema.plugin(materializeP);

module.exports = mongoose.model('Cate', CateSchema,'cate');